Skip to content

Conversation

sbtseiji
Copy link

@sbtseiji sbtseiji commented Sep 3, 2025

foundations/datetimeの翻訳です。

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR translates the foundations/datetime documentation from English to Japanese. The translation covers all user-facing documentation including function descriptions, parameter explanations, and formatting guidelines while maintaining the original code structure and functionality.

  • Translates all docstring comments from English to Japanese
  • Updates translation status for the datetime documentation page
  • Preserves all code examples and technical formatting

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
website/translation-status.json Updates status from "untranslated" to "translated" for datetime documentation
crates/typst-library/src/foundations/datetime.rs Translates all documentation comments to Japanese while preserving code functionality

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

/// An offset to apply to the current UTC date. If set to `{auto}`, the
/// offset will be the local offset.
/// 現在のUTC日時に適用するオフセットです。`{auto}` に設定
/// した場合は、ローカルのオフセットが適用されます。
Copy link
Preview

Copilot AI Sep 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 319 has trailing whitespace that should be removed for consistency.

Suggested change
/// した場合は、ローカルのオフセットが適用されます。
/// した場合は、ローカルのオフセットが適用されます。

Copilot uses AI. Check for mistakes.

Comment on lines 128 to 129
/// ください。たとえば、`{datetime(year: 2023, month: 10, day:
/// 13)}`のようにして新しい`datetime`を作成すると、内部的には
Copy link
Preview

Copilot AI Sep 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The line break in the middle of the code example {datetime(year: 2023, month: 10, day: 13)} should be avoided. Consider keeping the code example on a single line or restructuring the sentence to avoid breaking the code.

Suggested change
/// ください。たとえば、`{datetime(year: 2023, month: 10, day:
/// 13)}`のようにして新しい`datetime`を作成すると、内部的には
/// ください。たとえば、`{datetime(year: 2023, month: 10, day: 13)}`のようにして新しい`datetime`を作成すると、内部的には

Copilot uses AI. Check for mistakes.

Copy link
Member

@kimushun1101 kimushun1101 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

翻訳ありがとうございます。概ね問題ないように思います。

/// - `repr`: 曜日名(`long`)、曜日名の略称(`short`)、日曜(`sunday`)、月曜(`monday`)のいずれかを指定できます。
/// `long`と`short`では、対応する曜日名が英語で表示されます。
/// (月名と同様に、他言語での表示はまだサポートされていません)。
/// `sunday`と`monday`では、日曜または月曜から数えた日数が数値で表示されます
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// `sunday`と`monday`では、日曜または月曜から数えた日数が数値で表示されます
/// `sunday`と`monday`では、日曜または月曜から数えた日数が数値で表示されます

#[scope]
impl Datetime {
/// Creates a new datetime.
/// 新しい datetime を作成。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// 新しい datetime を作成
/// 新しいdatetimeを作成

/// _注_:指定する`datetime`の要素によって、Typstが保持する形式は次の3通りのいずれかになります。
/// * 年、月、日だけを指定した場合、Typstは日付のみを保持します。
/// * 時、分、秒だけを指定した場合、Typstは時刻のみを保持します。
/// * 年、月、日、時、分、秒すべてを指定した場合、Typst は完全な日時を保持します。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// * 年、月、日、時、分、秒すべてを指定した場合、Typst は完全な日時を保持します
/// * 年、月、日、時、分、秒すべてを指定した場合、Typstは完全な日時を保持します

#[func(constructor)]
pub fn construct(
/// The year of the datetime.
/// `datetime`の年
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// `datetime`の年
/// `datetime`の年

#[named]
year: Option<i32>,
/// The month of the datetime.
/// `datetime`の月
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// `datetime`の月
/// `datetime`の月

#[named]
month: Option<Month>,
/// The day of the datetime.
/// `datetime`の日
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// `datetime`の日
/// `datetime`の日

#[named]
day: Option<u8>,
/// The hour of the datetime.
/// `datetime`の時
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// `datetime`の時
/// `datetime`の時

#[named]
hour: Option<u8>,
/// The minute of the datetime.
/// `datetime`の分
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// `datetime`の分
/// `datetime`の分

#[named]
minute: Option<u8>,
/// The second of the datetime.
/// `datetime`の秒
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// `datetime`の秒
/// `datetime`の秒

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants